package com.example.pdm_project_group_001;

import android.database.Cursor;

public class BusRouteFinder {
	
	static Cursor cursor;
	
	// 
	
	public static int findBus(String locA, String locB){
		
		String noS="";
		cursor = DBDataControl.getDB().query(DBHelper.TABLE_BusRoutes,
				DBHelper.all_columns_BusRoutes	, 
				DBHelper.all_columns_BusRoutes[0]+"='"+locA+"' OR "+
				DBHelper.all_columns_BusRoutes[0]+"='"+locB+"' OR "+
				DBHelper.all_columns_BusRoutes[1]+"='"+locA+"' OR "+
				DBHelper.all_columns_BusRoutes[1]+"='"+locB+"'"
				, null, null, null, null);
		return cursor.getCount();
		//return -1;
	}
	public static int connectedPoints(int a){
		cursor = DBDataControl.getDB().query(DBHelper.TABLE_BusRoutes,
				DBHelper.all_columns_BusRoutes, 
				DBHelper.all_columns_BusRoutes[0]+"='"+a+"' OR "+
				DBHelper.all_columns_BusRoutes[1]+"='"+a+"'"
				, null, null, null, null);
		return cursor.getCount();
	}
	
	public static int findPath(int a, int b){
		
		return -1;
	}
	
	public static int findNext(int a, int b){
		
		return -1;
	}
	
}
